/*
 * XML Type:  persistence-unit-metadata
 * Namespace: http://java.sun.com/xml/ns/persistence/orm
 * Java type: com.googlecode.horncomb.orm.jpa.v10.xmlbeans.PersistenceUnitMetadata
 *
 * Automatically generated - do not modify.
 */
package com.googlecode.horncomb.orm.jpa.v10.xmlbeans.impl;
/**
 * An XML persistence-unit-metadata(@http://java.sun.com/xml/ns/persistence/orm).
 *
 * This is a complex type.
 */
public class PersistenceUnitMetadataImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements com.googlecode.horncomb.orm.jpa.v10.xmlbeans.PersistenceUnitMetadata
{
    
    /**  */
	private static final long serialVersionUID = -7698823753863614206L;


	public PersistenceUnitMetadataImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName XMLMAPPINGMETADATACOMPLETE$0 = 
        new javax.xml.namespace.QName("http://java.sun.com/xml/ns/persistence/orm", "xml-mapping-metadata-complete");
    private static final javax.xml.namespace.QName PERSISTENCEUNITDEFAULTS$2 = 
        new javax.xml.namespace.QName("http://java.sun.com/xml/ns/persistence/orm", "persistence-unit-defaults");
    
    
    /**
     * Gets the "xml-mapping-metadata-complete" element
     */
    public com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EmptyType getXmlMappingMetadataComplete()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EmptyType target = null;
            target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EmptyType)get_store().find_element_user(XMLMAPPINGMETADATACOMPLETE$0, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * True if has "xml-mapping-metadata-complete" element
     */
    public boolean isSetXmlMappingMetadataComplete()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(XMLMAPPINGMETADATACOMPLETE$0) != 0;
        }
    }
    
    /**
     * Sets the "xml-mapping-metadata-complete" element
     */
    public void setXmlMappingMetadataComplete(com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EmptyType xmlMappingMetadataComplete)
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EmptyType target = null;
            target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EmptyType)get_store().find_element_user(XMLMAPPINGMETADATACOMPLETE$0, 0);
            if (target == null)
            {
                target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EmptyType)get_store().add_element_user(XMLMAPPINGMETADATACOMPLETE$0);
            }
            target.set(xmlMappingMetadataComplete);
        }
    }
    
    /**
     * Appends and returns a new empty "xml-mapping-metadata-complete" element
     */
    public com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EmptyType addNewXmlMappingMetadataComplete()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EmptyType target = null;
            target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.EmptyType)get_store().add_element_user(XMLMAPPINGMETADATACOMPLETE$0);
            return target;
        }
    }
    
    /**
     * Unsets the "xml-mapping-metadata-complete" element
     */
    public void unsetXmlMappingMetadataComplete()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(XMLMAPPINGMETADATACOMPLETE$0, 0);
        }
    }
    
    /**
     * Gets the "persistence-unit-defaults" element
     */
    public com.googlecode.horncomb.orm.jpa.v10.xmlbeans.PersistenceUnitDefaults getPersistenceUnitDefaults()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.googlecode.horncomb.orm.jpa.v10.xmlbeans.PersistenceUnitDefaults target = null;
            target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.PersistenceUnitDefaults)get_store().find_element_user(PERSISTENCEUNITDEFAULTS$2, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * True if has "persistence-unit-defaults" element
     */
    public boolean isSetPersistenceUnitDefaults()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(PERSISTENCEUNITDEFAULTS$2) != 0;
        }
    }
    
    /**
     * Sets the "persistence-unit-defaults" element
     */
    public void setPersistenceUnitDefaults(com.googlecode.horncomb.orm.jpa.v10.xmlbeans.PersistenceUnitDefaults persistenceUnitDefaults)
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.googlecode.horncomb.orm.jpa.v10.xmlbeans.PersistenceUnitDefaults target = null;
            target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.PersistenceUnitDefaults)get_store().find_element_user(PERSISTENCEUNITDEFAULTS$2, 0);
            if (target == null)
            {
                target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.PersistenceUnitDefaults)get_store().add_element_user(PERSISTENCEUNITDEFAULTS$2);
            }
            target.set(persistenceUnitDefaults);
        }
    }
    
    /**
     * Appends and returns a new empty "persistence-unit-defaults" element
     */
    public com.googlecode.horncomb.orm.jpa.v10.xmlbeans.PersistenceUnitDefaults addNewPersistenceUnitDefaults()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.googlecode.horncomb.orm.jpa.v10.xmlbeans.PersistenceUnitDefaults target = null;
            target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.PersistenceUnitDefaults)get_store().add_element_user(PERSISTENCEUNITDEFAULTS$2);
            return target;
        }
    }
    
    /**
     * Unsets the "persistence-unit-defaults" element
     */
    public void unsetPersistenceUnitDefaults()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(PERSISTENCEUNITDEFAULTS$2, 0);
        }
    }
}
